package com.zx.security.reactive.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.client.WebClient;

/**
 * <p>
 * description:负载均衡WebClient  <br>
 * create: 2025-05-13 09:39
 * </p>
 *
 * @author zhou  xun
 */
@Configuration
public class LoadBalancedWebClientConfiguration {
    @Bean
    @LoadBalanced  // 启用负载均衡
    public WebClient.Builder loadBalancedWebClientBuilder() {
        return WebClient.builder();
    }
}
